<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <script type="text/javascript" src="../js/vue.js"></script>
  <title>el与data的两种方式</title>
</head>
<body>
  <div id="root">
    <h2>el&data</h2>
    <hr>
    <input type="text" :value="data1">
    <input type="text" v-model="data2">
  </div>
  <script type="text/javascript">
    Vue.config.productionTip = false 
    const vm = new Vue({
      data(){ 
        return {
          data1:'单向绑定',
          data2:'双向绑定'
        }
      }
    })
    vm.$mount('#root')
  </script>
</body>
</html>